package com.wangxinyuchuan.demo.strategy;

import com.wangxinyuchuan.demo.factory.HandlerFactory;
import com.wangxinyuchuan.demo.template.AbstractHandler;
import org.springframework.stereotype.Component;

@Component
public class AnimalHandler extends AbstractHandler {
    @Override
    public void afterPropertiesSet() throws Exception {
        HandlerFactory.register("animal", this);
    }

    @Override
    public void AA(String nickName) {
        System.out.println("AnimalHandler---AA：" + nickName);
    }

    @Override
    public void BB(String nickName) {
        System.out.println("AnimalHandler---BB：" + nickName);
    }
}
